package com.zhouyu.service;

import java.beans.PropertyEditor;
import java.beans.PropertyEditorSupport;

/**
 * @author leimingchao
 * create 2025-04-17 17:58
 *
 * java中的类型转换
 */
public class StringToUserPropertyEditor extends PropertyEditorSupport implements PropertyEditor {

	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		User user = new User();
		user.setName(text);
		this.setValue(user);
	}
}
